<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:comp="http://java.sun.com/jsf/composite">
	<ice:form id="discovery">
		<div align="center"><ice:commandButton
			styleClass="orangeButtons" value="Register Gatekeeper"
			actionListener="#{registrator.gkInit}" partialSubmit="true">
		</ice:commandButton> <ice:commandButton styleClass="orangeButtons" value="Register MCU"
			actionListener="#{registrator.mcuInit}" partialSubmit="true">
		</ice:commandButton></div>

		<ice:panelPopup id="modalPnlPop" draggable="false" modal="true"
			visible="#{registrator.rendered}" autoCentre="true"
			styleClass="corePopup">
			<f:facet name="header">
				<ice:panelGroup styleClass="popupHeaderWrapper">
					<ice:outputText value="#{registrator.title}"
						styleClass="popupHeaderText" />
					<ice:commandButton id="modalPnlCloseBtn" type="button"
						image="./images/popupclose.gif" style="float:right"
						actionListener="#{registrator.close}"
						styleClass="popupHeaderImage" title="Close Popup" alt="Close"
						immediate="true" />
				</ice:panelGroup>
			</f:facet>
			<f:facet name="body">
				<ice:panelGroup  styleClass="popupBody">
					<ice:outputLabel value="IP:" />
					<ice:outputLabel value="*" style="font-color: red" />
					<ice:inputText value="#{registrator.host}" required="true" id="ip" />
					<ice:outputLabel value="Port:" />
					<ice:outputLabel value="*" style="font-color: red" />
					<ice:message for="ip" />
					<ice:inputText value="#{registrator.port}" required="true"
						id="host">
						<f:validateLongRange minimum="1" maximum="65535" />
					</ice:inputText>
					<ice:message for="host" />
					<ice:outputLabel rendered="#{registrator.type == 'MCU'}" value="Prefix:" />
					<ice:inputText rendered="#{registrator.type == 'MCU'}" value="#{registrator.prefix}" required="true"
						id="prefix" />
					<ice:message rendered="#{registrator.type == 'MCU'}" for="prefix" />
					<ice:outputLabel rendered="#{registrator.type == 'MCU'}" value="Http port:" />
					<ice:inputText rendered="#{registrator.type == 'MCU'}" value="#{registrator.httpPort}" required="true"
						id="httpPort" />
					<ice:message rendered="#{registrator.type == 'MCU'}" for="httpPort" />
					<ice:outputLabel value="User name:" />
					<ice:inputText value="#{registrator.username}" />
					<ice:outputLabel value="Password:" />
					<ice:inputSecret value="#{registrator.password}" />
					<br />
					<div align="center"><ice:commandButton
						styleClass="orangeButtons" value="Register"
						actionListener="#{registrator.register}" /></div>
					<ice:messages />
				</ice:panelGroup>
			</f:facet>
		</ice:panelPopup>
	</ice:form>
</ui:composition>
